import React, { useCallback } from "react";
import style from "./forKeysCom.module.scss";

const ForKeysCom = ({ item, myKey }) => {
  const mapItem = useCallback((item) => {
    return item.map((item, key) => {
      return <div key={key}>{item}</div>;
    });
  }, []);
  return (
    <React.Fragment>
      <div className={style.forKeysCom}>
        <div className={style.weightFront}>{myKey}</div>
        {mapItem(item)}
      </div>
    </React.Fragment>
  );
};

export default ForKeysCom;
